
package com.intretech.umsin.demo.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.intretech.umsin.common.annotation.Dict;
import com.intretech.umsin.datasource.codemapping.entity.Assignment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
* @version V1.0
* 用户:user 对应的VO模型类.
* @ClassName: UserVo
* @Description: 用户:user 对应的VO模型类.
* @author: 李启联
* @date:   2022-4-22 16:33:59
* @Copyright: Copyright (c) 2022
*/
@ApiModel("用户")
@ExcelIgnoreUnannotated
public class UserVo implements Assignment, Serializable {

    // 主键id
    @ApiModelProperty(value = "主键id" ,dataType="varchar(64)" ,required= true)
    @ExcelProperty(value = "主键id")
    private Long id;

    // 名称
    @ApiModelProperty(value = "名称" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "名称")
    private String name;

    // 年龄
    @ApiModelProperty(value = "年龄" ,dataType="int(10)" ,required= false)
    @ExcelProperty(value = "年龄")
    private Integer age;

    // 性别
    @ApiModelProperty(value = "性别" ,dataType="int(10)" ,required= false)
    @ExcelProperty(value = "性别")
    @Dict(dicCode = "sex")
    private Integer sex;

    // 版本号
    @ApiModelProperty(value = "版本号" ,dataType="int(10)" ,required= false)
    @ExcelProperty(value = "版本号")
    private Integer version;

    // 租户ID
    @ApiModelProperty(value = "租户ID" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "租户ID")
    private String tenantId;

    // 创建人
    @ApiModelProperty(value = "创建人" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "创建人")
    private String creator;

    // 修改人
    @ApiModelProperty(value = "修改人" ,dataType="varchar(64)" ,required= false)
    @ExcelProperty(value = "修改人")
    private String modifier;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    // 创建时间
    @ApiModelProperty(value = "创建时间" ,dataType="datetime()" ,required= false)
    @ExcelProperty(value = "创建时间")
    private java.time.LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    // 修改时间
    @ApiModelProperty(value = "修改时间" ,dataType="datetime()" ,required= false)
    @ExcelProperty(value = "修改时间")
    private java.time.LocalDateTime modifyTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    // 生日
    @ApiModelProperty(value = "生日" ,dataType="datetime()" ,required= false)
    @ExcelProperty(value = "生日")
    private java.time.LocalDateTime birthday;

    public Long getId(){
    return this.id;
    }

    public void setId(Long id){
    this.id = id;
    }
    public String getName(){
    return this.name;
    }

    public void setName(String name){
    this.name = name;
    }
    public Integer getAge(){
    return this.age;
    }

    public void setAge(Integer age){
    this.age = age;
    }
    public Integer getSex(){
    return this.sex;
    }

    public void setSex(Integer sex){
    this.sex = sex;
    }
    public Integer getVersion(){
    return this.version;
    }

    public void setVersion(Integer version){
    this.version = version;
    }
    public String getTenantId(){
    return this.tenantId;
    }

    public void setTenantId(String tenantId){
    this.tenantId = tenantId;
    }
    public String getCreator(){
    return this.creator;
    }

    public void setCreator(String creator){
    this.creator = creator;
    }
    public String getModifier(){
    return this.modifier;
    }

    public void setModifier(String modifier){
    this.modifier = modifier;
    }
    public java.time.LocalDateTime getCreateTime(){
    return this.createTime;
    }

    public void setCreateTime(java.time.LocalDateTime createTime){
    this.createTime = createTime;
    }
    public java.time.LocalDateTime getModifyTime(){
    return this.modifyTime;
    }

    public void setModifyTime(java.time.LocalDateTime modifyTime){
    this.modifyTime = modifyTime;
    }
    public java.time.LocalDateTime getBirthday(){
    return this.birthday;
    }

    public void setBirthday(java.time.LocalDateTime birthday){
    this.birthday = birthday;
    }

    public UserVo(){
    }

    @Override
    public String toString(){
        return " UserVo ["
             +" id = " +id +" ,"
             +" name = " +name +" ,"
             +" age = " +age +" ,"
             +" sex = " +sex +" ,"
             +" version = " +version +" ,"
             +" tenantId = " +tenantId +" ,"
             +" creator = " +creator +" ,"
             +" modifier = " +modifier +" ,"
             +" createTime = " +createTime +" ,"
             +" modifyTime = " +modifyTime +" ,"
             +" birthday = " +birthday
        +" ]";
    }

}